<template>
    <div class="note-page">

        <div class="banner">
            <div class="banner-content">
                <h1>关于我</h1>
                <h3>记录生活的点点滴滴，回忆往事</h3>
            </div>
            <div class="wave"></div>

        </div>
        <div class="content-container">


        </div>
    </div>
</template>

<script setup>

onMounted(() => {
    if (CSS.paintWorklet) {
        const moduleUrl = new URL('@/utils/CSSHoudini.js', import.meta.url).href
        CSS.paintWorklet.addModule(moduleUrl)

    }
})
</script>

<style lang="less" scoped>
.note-page {
    min-height: 100vh;

    .banner {
        height: 430px;
        background-image: url('https://picsum.photos/1900/480');
        background-repeat: no-repeat;
        background-size: cover;
        background-origin: center;
        background-position: center;
        position: relative;
        background-repeat: no-repeat;

        .banner-content {
            position: absolute;
            top: 30%;
            left: 50%;
            transform: translateX(-50%);
            width: 30%;
            z-index: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 30px;
            h1 {
                color: @white;
                text-align: center;
            }

            h3 {
                margin-top: 20px;
                color: @white;
                background: @black-alpha-2;
                padding: 10px;
                border-radius: 8px;
                box-sizing: border-box;
                margin: 0 auto;
                animation: content-slide-in 2s steps(26) forwards;
                overflow: hidden;
                white-space: nowrap;
                position: relative;
            }


            h3::after {
                content: '';
                position: absolute;
                right: 0px;
                top: 50%;
                transform: translateY(-50%);
                height: 19px;
                width: 10px;

                animation: sprinkle-bling .5s steps(2) infinite;
            }

            @keyframes content-slide-in {
                from {
                    width: 0;
                }

                to {
                    width: 26ch;
                }
            }

            @keyframes sprinkle-bling {
                from {
                    border-left: 2px solid transparent;
                }

                to {
                    border-left: 2px solid @white;
                }
            }

        }

        .wave {
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 300px;
            background: paint(waveDraw);
            animation: move 20s infinite linear;
            --amplitude: 20;
            --gap: 40;
            --animation-tick: 700;
            --height: 0.7;
            --color1: @color1;
            --color2: @color2;
            transition: --height 8s;
        }

    }



    @property --animation-tick {
        syntax: '<number>';
        inherits: false;
        initial-value: 1000;
    }

    @keyframes move {
        100% {
            --animation-tick: 1;
        }
    }

    .content-container {

        min-height: 40vh;
        position: relative;

        &::before {
            background: linear-gradient(#00000015, #00000015, #00000015, @gradient-bg);
            bottom: 0;
            content: "";
            display: block;
            left: 0;
            position: absolute;
            right: 0;
            height: 430px;
            top: -430px;
        }



    }
}
</style>